package me.jiatao.wan.data.database.dao

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import me.jiatao.wan.data.database.entity.BannerEntity

/**
 * @Author: JiaTao
 * @CreateDate: 2021/8/29 13:56
 * @Version: 1.0
 * @Description:
 */

@Dao
interface BannerDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insertList(bannerList: List<BannerEntity>)

    @Query("SELECT * FROM BannerEntity")
    fun getList(): List<BannerEntity>

    @Query("DELETE FROM BannerEntity")
    suspend fun clear()
}